<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        const person = { name: 'pink', age: 18 };
        console.log(Object.keys(person));//['name', 'age']

        console.log(Object.values(person));//['pink', 18]
        const o = {};
        console.log(Object.assign(o, person));//{name: 'pink', age: 18}
        Object.assign(o, { gender: '女' });
        console.log(o);//{name: 'pink', age: 18, gender: '女'}
    </script>
</body>

</html>